:root{
  --bg: #f0f0f0;
  --surface: #fff;
  --accent: #007bff;
  --radius: 8px;
  --container-w: 400px;
  --gap: 12px;
}

/* Make mobile-safe and avoid 100vh visual viewport issues on mobile browsers */
*{box-sizing:border-box}
html, body { height: 100%; }
body {
  font-family: Arial, sans-serif;
  background-color: var(--bg);
  margin: 0;
  padding: env(safe-area-inset-top) env(safe-area-inset-right) env(safe-area-inset-bottom) env(safe-area-inset-left);
  display: flex;
  justify-content: center;
  align-items: center;
  min-height: 100vh;
}

.container {
  background-color: var(--surface);
  padding: 20px;
  border-radius: var(--radius);
  box-shadow: 0 0 10px rgba(0, 0, 0, 0.08);
  width: var(--container-w);
  max-width: 92%;
}

h1 {
  text-align: center;
  margin-bottom: 20px;
}

form {
  display: flex;
  flex-direction: column;
}

input {
  margin-bottom: 10px;
  padding: 10px 12px;
  border: 1px solid #ccc;
  border-radius: 6px;
  font-size: 16px;
}

button {
  padding: 12px 14px;
  background-color: var(--accent);
  color: white;
  border: none;
  border-radius: 6px;
  cursor: pointer;
  touch-action: manipulation;
}

button:hover { background-color: #0056b3; }

/* Larger touch targets on small screens */
@media (max-width: 700px) {
  input, button { font-size: 18px; padding: 14px; }
  .container { padding: 16px; }
}

/* Action menu and inline geek editor tweaks */
.action-menu button { background: transparent; color: var(--accent); border: none; width:100%; text-align:left }
.geek-edit .geek-input { font-family: monospace; }
.geek-edit button { background: transparent; border:1px solid rgba(0,0,0,0.1); color: var(--accent); }

/* Ensure inline action menu doesn't overflow on small screens */
.action-menu { max-width: 240px; }
.message .bubble { word-wrap: break-word; }

#messages {
  height: 300px;
  overflow-y: auto;
  border: 1px solid #ccc;
  padding: 10px;
  margin-bottom: 10px;
  background-color: #fafafa;
  word-break: break-word;
}

.message {
  margin-bottom: 10px;
}

.message strong {
  color: #007bff;
}

p {
  text-align: center;
  margin-top: 10px;
}

a {
  color: #007bff;
}

/* Message bubble base (keeps geeky monospace for bot but visually aligned with other bubbles) */
.message .bubble {
  padding: 10px;
  border-radius: 8px;
  border: 1px solid rgba(0,0,0,0.06);
  background: #ffffff;
  color: #111;
}

/* Deepseek: same bubble style but slight tint and monospace font to keep Geek feel.
   Not blue; subtle warm tint so it reads as a different actor but matches user bubbles. */
.message.deepseek .meta { font-weight: 600; }
.message.deepseek .bubble {
  background: linear-gradient(180deg,#0f2b12 0%, #103419 100%); /* distinct deep green */
  color: #dff8e0;
  font-family: 'Courier New', Consolas, monospace;
  box-shadow: inset 0 -1px 0 rgba(255,255,255,0.02);
}
.message.deepseek .bubble[data-content] { cursor: pointer; }

